package com.hanter.android.radui.mvvm;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.hanter.android.radui.ActivityResult;

public class BaseViewModel extends ViewModel {

    public static final int PAGE_STATE_LOADING = 0;
    public static final int PAGE_STATE_CONTENT = 1;
    public static final int PAGE_STATE_EXCEPTION = 2;
    public static final int PAGE_STATE_BACK = 3;

    private MutableLiveData<Integer> pageState = new MutableLiveData<>();
    private ActivityResult pageResult;
    private MutableLiveData<Boolean> showProgress = new MutableLiveData<>();
    private MutableLiveData<String> toast = new MutableLiveData<>();


    public MutableLiveData<Integer> getPageState() {
        return pageState;
    }

    public void setPageState(MutableLiveData<Integer> pageState) {
        this.pageState = pageState;
    }

    public ActivityResult getPageResult() {
        return pageResult;
    }

    public void setPageResult(ActivityResult pageResult) {
        this.pageResult = pageResult;
    }

    public MutableLiveData<Boolean> getShowProgress() {
        return showProgress;
    }

    public void setShowProgress(MutableLiveData<Boolean> showProgress) {
        this.showProgress = showProgress;
    }

    public MutableLiveData<String> getToast() {
        return toast;
    }

    public void setToast(MutableLiveData<String> toast) {
        this.toast = toast;
    }
}
